<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>开牌</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="H-ui.admin/lib/html5shiv.js"></script>
<script type="text/javascript" src="H-ui.admin/lib/respond.min.js"></script>
<link rel="stylesheet" type="text/css" href="H-ui.admin/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="H-ui.admin/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="H-ui.admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="H-ui.admin/static/h-ui.admin/css/style.css" />
<script type="text/javascript" src="H-ui.admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
  </head>
  
  <body>
   <article class="page-container">
   <nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">&gt;</span> 开牌管理 <span class="c-gray en">&gt;</span> 开牌 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a></nav>
	<form action="handsActionaddBeginHands" method="post" class="form form-horizontal" >
		<div class="row cl">
			<label class=" col-xs-4 col-sm-1"><span class="c-red">*</span>手牌号：</label>
			<div class="formControls col-xs-3">
				<input type="text" class="input-text" value=""  id="handsid" name="sywCustomer.sywHands.id">
				<span style="color: red" id="mag"></span>
			</div>
		</div>
		<div class="row cl">
			<label class=" col-xs-4 col-sm-1"><span class="c-red">*</span>姓名：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text" value=""  id="name" name="sywCustomer.name">
			</div>
		</div>
		<div class="row cl">
			<label class=" col-xs-4 col-sm-1"><span class="c-red">*</span>身份证：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"  name="card" id="sywCustomer.card">
			</div>
		</div>
		<div class="row cl">
			<label class=" col-xs-4 col-sm-1"><span class="c-red">*</span>地址：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text" name="address" id="sywCustomer.address">
			</div>
		</div>
		<div class="row cl">
			<label class=" col-xs-4 col-sm-1"><span class="c-red">*</span>电话：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text" name="telephone" id="sywCustomer.telephone">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-3 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="H-ui.admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="H-ui.admin/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="H-ui.admin/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="H-ui.admin/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript" src="H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="H-ui.admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="H-ui.admin/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="H-ui.admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-member-add").validate({
		rules:{
			username:{
				required:true,
				minlength:2,
				maxlength:16
			},
			sex:{
				required:true,
			},
			mobile:{
				required:true,
				isMobile:true,
			},
			email:{
				required:true,
				email:true,
			},
			uploadfile:{
				required:true,
			},
			
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			//$(form).ajaxSubmit();
			var index = parent.layer.getFrameIndex(window.name);
			//parent.$('.btn-refresh').click();
			parent.layer.close(index);
		}
	});
	$("#handsid").blur(function(){
		var handsid=$("#handsid").val();
		var reg = /^\d{4}$/;
		if(reg.test(handsid)==false){
			$("#mag").html("手牌号为4位数字");
		}else{
			var url = "handsActionajaxHand";
			var args = {
				"sywCustomer.sywHands.id" : handsid,
				"time" : new Date()
			};
			$.post(url, args, function(data) {
			//表示可用
			if (data == "1") {
				$("#mag").html("此手牌为在使用或维修状态或者不存在");
			}else if (data == "0") {//不可用
				$("#mag").html("");
			}
			//服务器错误
			else {
			$("#mag").html("服务器出错");
			}
			});
			
		}
	});
});
</script> 
  </body>
</html>
